SOURCE_BASE="/opt/eclipse-hydra/workspace/php_basic/htdocs"
SOURCE_HYDRA="/opt/eclipse-hydra/workspace/hydracms/htdocs"
SOURCE="/opt/eclipse-hydra/git/kibicbridge-cms"
DEST="/var/www/kibicbridge"

echo 'Publish to Apache'
echo 'Copy changes...'
echo '----------------------------------------------------------------------'
echo 'Copy base...'
cp -ru $SOURCE_BASE/* $DEST
echo 'Copy cms...'
cp -ru $SOURCE_HYDRA/* $DEST
echo 'Copy site...'
cp -ru $SOURCE/* $DEST
echo 'Cleaning up...'
chmod 777 $DEST/log
chmod 777 $DEST/files/*
find $DEST -name '.svn' | xargs rm -rf 
find $DEST -name '!minta*' | xargs rm -rf 
echo '----------------------------------------------------------------------'
